<template>
    <div class="">
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item><i class="el-icon-message"></i>&nbsp;加盟申请详情</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <el-form  label-width="160px">
                <el-form-item label="用户名称：">
                    <div>
                        {{data. name}}
                    </div>
                </el-form-item>
                <el-form-item label="照片：">
                    <div v-for="item in imgList" :key="item" style="float:left">
                        <img :src="item" style="width:300px;height:150px;"/>
                    </div>
                </el-form-item>
                <el-form-item label="联系电话：">
                    <div>
                        {{data.mobile}}
                    </div>
                </el-form-item>
                 <el-form-item label="联系地址：">
                    <div>
                        {{data.address}}
                    </div>
                </el-form-item>
                 <el-form-item label="加盟城市：">
                    <div>
                        {{data.city_name}}
                    </div>
                </el-form-item>
                <el-form-item label="申请描述：">
                    <div>
                        {{data.description}}
                    </div>
                </el-form-item>
                 <el-form-item label="联系电话：">
                    <div>
                        {{data.mobile}}
                    </div>
                </el-form-item>
                <el-form-item label="申请时间：">
                    <div>
                        {{data.create_date}}
                    </div>
                </el-form-item>
                 <el-form-item label="审核状态：">
                    <div>
                        {{data.trans_is_checked}}
                    </div>
                </el-form-item>
              
                <el-form-item>
                    <el-button type="primary" @click="returnList">返回列表</el-button>
                </el-form-item>
            </el-form>
        </div>
       
    </div>
</template>
<script>
import {getSubstationJoinList,posthandlerJoin,} from '@/api/substation'
export default {
    name:"SchoolAdd",
    data() {
        return {
            id:0, //详情id
            data:'',//数据
            imgList:[],//图集
        }
    },
    //实例创建
    created(){
        if(this.$route.query.id &&this.$route.query.id!=""){
            this.id = this.$route.query.id;
            this.getData();
        }else{
            //企业认证详情
            alert("获取详情ID失败")
        }
    },
    //计算属性
    computed:{
        tagList (){
            
        }
    },
    //方法
    methods: {
        //获取详情
        getData(){
            // console.log(this.id)
            getSubstationJoinList('','','','','',1,10).then((response)=> {
                // console.log(response);
                if(response.code==200){
                   let list = response.data.list;
                   //遍历查找
                   for(let i=0; i<list.length;i++){
                       if(list[i].id == this.id){//找到了
                            // console.log("扎到了")
                            this.data = list[i];
                            this.imgList = JSON.parse(list[i].img_list); 
                            // console.log(this.data);
                       }
                   }
                }else{
                    this.$notify.error({
                        title: '异常',
                        offset: 100,
                        message: response.msg
                    });
                }
            })
        },
        //返回列表
        returnList (){
          this.$router.go(-1);
        }
    }
}
</script>
<style lang="stylus" scoped>
    .el-form-item .el-cascader{
        width :400px;
    }
    .el-cascader-menus .el-cascader-menu{
        width :240px
    }
    .sola-upload{
        .sola-left{
            width :100%;
            height :auto;
            .sola-flex{
                float:left
                width: 360px;
                height: 180px;
                margin-bottom 20px;
                margin-right:15px;
                position:relative;
                .delete{
                    position:absolute;
                    top:2px;
                    right:13px;
                    color: #f56c6c;
                    display:inline-block;
                    padding:5px 5px;
                    .el-alert__icon{font-size:28px;cursor:pointer}
                }
                img {
                    width:100%;
                    height:100%;
                }
            }
        }
        .sola-file-box{
            position:relative;
            .btn-file{
                position:absolute;
                top:0;
                left:0;
                z-index 1;
                opacity:0;
                width :120px;
                height :40px;
                outline: 0;
                background-color :none;
                cursor:pointer;
            }
        }

    }
</style>


